package com.example.mypc.fragmentdemo;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;




/**
 * Created by abiguime on 2016/10/10.
 */

public class MyDetailsFragment extends Fragment {


    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        return inflater.inflate(R.layout.my_details_fragment_layout, container, false);
    }

    TextView tv;

    @Override
    public void onViewCreated(View view, Bundle savedInstanceState) {

          tv = (TextView) view.findViewById(R.id.tv_title);
    }

    public void setSelectedOne(int position) {

        tv.setText("这是第"+position+"个");
    }
}
